<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<title>Document</title>
</head>
<body>
	<h1 id="ab"></h1>
</body>
<script>
	es={"id":"7","name":"longlog","addtime":"11.00","message":"很好很好"};
	for(i in es){
		
	}
        var json = {  
            "age":"24",  
            "name":"cst"  
        };  
        //修改Json中的age值,因为Json中存在age属性  
        json["age"] = 30; 
//      <!-- 遍历Json中的数据 -->  
var xxmy="";
        for(var key in json){  
            try{  
                var value = eval("json['" +  key +"']");  
                xxmy+="'"+key+"':'"+value+"',";  
            }catch(e){} 
        }  
// xxmy=xxmy;
   xxmy = xxmy.substring(0, xxmy.lastIndexOf(','));  
	document.getElementById("ab").innerHTML=xxmy;
</script>
</html>
